******************************************************************************************
* BETTER TO TRUST IN THE LORD, 2024, Zellman, Justwan, and Fox, JoGSS, Replication codes *
******************************************************************************************

* Set up constraints

constraint 1 [#2=0]:t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3
constraint 2 [#3=0]:t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_bindingA t_bindingA2 t_bindingA3
constraint 3 [#4=0]:t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3

* Table A5: Religious Salience and Challenger Dispute Resolution Proposals (Base Model)

mlogit chal_legalbinding i.chal_lxx_3 cont_sacred_high chal_relpop_high chal_sacred_high tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A6: Religious Salience and Challenger Dispute Resolution Proposals (Interactive Model)

mlogit chal_legalbinding i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Tests for Figure 1

margins, dydx(cont_sacred_high) at(chal_lxx_3=(1)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel1-1.gph)

margins, dydx(chal_relpop_high) at(chal_lxx_3=(1)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Co-Religionists", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel1-2.gph)

margins, dydx(chal_sacred_high) at(chal_lxx_3=(1)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Non-Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel1-3.gph)

graph combine Panel1-1.gph Panel1-2.gph Panel1-3.gph, xcommon ycommon title(Figure 1: Effect of Religious Salience on CM Preference) subtitle("Secular Regimes") iscale(.5) row(1)

* Tests for Figure 2

margins, dydx(cont_sacred_high) at(chal_lxx_3=(3)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Contested Sacred Sites", size(medium)) xlabel(2 "Moderately Rel." 3 "Highly Rel.") xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel2-1.gph)

margins, dydx(chal_relpop_high) at(chal_lxx_3=(3)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Co-Religionists", size(medium)) xlabel(2 "Moderately Rel." 3 "Highly Rel.") xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel2-2.gph)

margins, dydx(chal_sacred_high) at(chal_lxx_3=(3)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Non-Contested Sacred Sites", size(medium)) xlabel(2 "Moderately Rel." 3 "Highly Rel.") xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel2-3.gph)

graph combine Panel2-1.gph Panel2-2.gph Panel2-3.gph, xcommon ycommon title(Figure 2: Effect of Religious Salience on CM Preference) subtitle("Highly Religious Regimes") iscale(.5) row(1)

* Marginal Probabilities for Table 2

margins, at(cont_sacred_high=(0 1) chal_lxx_3=(3)) predict(outcome(1)) noestimcheck
margins, at(cont_sacred_high=(0 1) chal_lxx_3=(3)) predict(outcome(2)) noestimcheck
margins, at(cont_sacred_high=(0 1) chal_lxx_3=(3)) predict(outcome(3)) noestimcheck

margins, at(chal_sacred_high=(0 1) chal_lxx_3=(3)) predict(outcome(1)) noestimcheck
margins, at(chal_sacred_high=(0 1) chal_lxx_3=(3)) predict(outcome(2)) noestimcheck
margins, at(chal_sacred_high=(0 1) chal_lxx_3=(3)) predict(outcome(3)) noestimcheck

margins, at(chal_relpop_high=(0 1) chal_lxx_3=(3)) predict(outcome(1)) noestimcheck
margins, at(chal_relpop_high=(0 1) chal_lxx_3=(3)) predict(outcome(2)) noestimcheck
margins, at(chal_relpop_high=(0 1) chal_lxx_3=(3)) predict(outcome(3)) noestimcheck

*Tests for Figure 3

margins, dydx(cont_sacred_high) at(chal_lxx_3=(2)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel3-1.gph)

margins, dydx(chal_relpop_high) at(chal_lxx_3=(2)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Co-Religionists", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel3-2.gph)

margins, dydx(chal_sacred_high) at(chal_lxx_3=(2)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Non-Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(Panel3-3.gph)

graph combine Panel3-1.gph Panel3-2.gph Panel3-3.gph, xcommon ycommon title(Figure 3: Effect of Religious Salience on CM Preference) subtitle("Moderately Religious Regimes") iscale(.5) row(1)

* Marginal Probabilities for Table 3

margins, at(cont_sacred_high=(0 1) chal_lxx_3=(2)) predict(outcome(1)) noestimcheck
margins, at(cont_sacred_high=(0 1) chal_lxx_3=(2)) predict(outcome(2)) noestimcheck
margins, at(cont_sacred_high=(0 1) chal_lxx_3=(2)) predict(outcome(3)) noestimcheck

margins, at(chal_sacred_high=(0 1) chal_lxx_3=(2)) predict(outcome(1)) noestimcheck
margins, at(chal_sacred_high=(0 1) chal_lxx_3=(2)) predict(outcome(2)) noestimcheck
margins, at(chal_sacred_high=(0 1) chal_lxx_3=(2)) predict(outcome(3)) noestimcheck

margins, at(chal_relpop_high=(0 1) chal_lxx_3=(2)) predict(outcome(1)) noestimcheck
margins, at(chal_relpop_high=(0 1) chal_lxx_3=(2)) predict(outcome(2)) noestimcheck
margins, at(chal_relpop_high=(0 1) chal_lxx_3=(2)) predict(outcome(3)) noestimcheck

* Table A7 – Religious Salience and Challenger Dispute Resolution Proposals (Model R1), Base Model, Omit Challenger State Religiosity

mlogit chal_legalbinding cont_sacred_high chal_relpop_high chal_sacred_high tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A8 – Religious Salience and Challenger Dispute Resolution Proposals (Model R2), Base Model, Omit Religious Salience

mlogit chal_legalbinding i.chal_lxx_3 tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A9 – Religious Salience and Challenger Dispute Resolution Proposals (Model R3), Interactive Model, Holy Oaths Control

mlogit chal_legalbinding i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 chal_holyoath_ils_all t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A10 – Religious Salience and Challenger Dispute Resolution Proposals (Model R4), Interactive Model, Religious Majorities Control

mlogit chal_legalbinding i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 chal_Mchr chal_Mmus chal_Mbud t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A11 – Religious Salience and Challenger Dispute Resolution Proposals (Model R5), Interactive Model, Sub DPI Nationalist Executive Interaction

mlogit chal_legalbinding i.chal_execnat##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Figure A1/Figure A2 Marginal Effects for R6

margins 0.chal_execnat, dydx(cont_sacred_high chal_relpop_high chal_sacred_high) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
margins 1.chal_execnat, dydx(cont_sacred_high chal_relpop_high chal_sacred_high) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck

margins, dydx(cont_sacred_high) at(chal_execnat=(0)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(A1-1.gph)

margins, dydx(chal_relpop_high) at(chal_execnat=(0)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Co-Religionists", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(A1-2.gph)

margins, dydx(chal_sacred_high) at(chal_execnat=(0)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Non-Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(A1-3.gph)

graph combine A1-1.gph A1-2.gph A1-3.gph, xcommon ycommon title(Figure A1: Effect of Religious Salience on CM Preference) subtitle("Non-Nationalist Executives") iscale(.5) row(1)

margins, dydx(cont_sacred_high) at(chal_execnat=(1)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(A2-1.gph)

margins, dydx(chal_relpop_high) at(chal_execnat=(1)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Co-Religionists", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(A2-2.gph)

margins, dydx(chal_sacred_high) at(chal_execnat=(1)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) noestimcheck
marginsplot, title ("Effect of Non-Contested Sacred Sites", size(medium)) xtitle("") ytitle(Effect on Predicted Probability of each Outcome) yline(0) xlabel(1 "Bilateral" 2 "Non-Binding" 3 "Binding") xscale(range(.5 4)) plotopts(connect(none)) saving(A2-3.gph)

graph combine A2-1.gph A2-2.gph A2-3.gph, xcommon ycommon title(Figure A2: Effect of Religious Salience on CM Preference) subtitle("Nationalist Executives") iscale(.5) row(1)

* Table A12 – Religious Salience and Challenger Dispute Resolution Proposals (Model R6), Interactive Model, V-Dem Nationalist Government Control

mlogit chal_legalbinding chal_v2exl_legitideolcr_0 i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A13 – Religious Salience and Challenger Dispute Resolution Proposals (Model R7), Interactive Model, V-Dem Religious Government Control

mlogit chal_legalbinding chal_v2exl_legitideolcr_4 i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A14 – Religious Salience and Challenger Dispute Resolution Proposals (Model R8), Base Model, Polity2 Democracy Measure Substitution

mlogit chal_legalbinding i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_polity2 rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A15 – Religious Salience and Challenger Dispute Resolution Proposals (Model R9), Interactive Model, Dichotomous Democracy Measure Substitution

mlogit chal_legalbinding i.chal_lxx_3 chal_v2x_democracy01##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A16 – Religious Salience and Challenger Dispute Resolution Proposals (Model R10), Base Model, Proximity Control

mlogit chal_legalbinding i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 ln_km t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)

* Table A17 - Religious Salience and Challenger Dispute Resolution Proposals (Model R11), Interactive Model, Chal Coup Risk

mlogit chal_legalbinding i.chal_lxx_3##(cont_sacred_high chal_relpop_high chal_sacred_high) tchistchal tcstratloc tcresource tcentirecl dyad_RASmaj_strict chal_v2x_polyarchy chal_max_couprisk rel_chal_cinc s_wt_atop trade_sum pacsett tertot t_mid claim_duration_1989 t_negotiationsA t_negotiationsA2 t_negotiationsA3 t_nbtpA t_nbtpA2 t_nbtpA3 t_bindingA t_bindingA2 t_bindingA3, vce(cluster claimdy) constraints(1 2 3)
